package com.hnhuas.salary.modules.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.hnhuas.salary.common.utils.PageUtils;
import com.hnhuas.salary.common.utils.Query;
import com.hnhuas.salary.modules.admin.dao.SalaryPayDao;
import com.hnhuas.salary.modules.admin.entity.SalaryPayEntity;
import com.hnhuas.salary.modules.admin.service.SalaryPayService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;



@Service("salaryPayService")
public class SalaryPayServiceImpl extends ServiceImpl<SalaryPayDao, SalaryPayEntity> implements SalaryPayService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SalaryPayEntity> page = this.page(
                new Query<SalaryPayEntity>().getPage(params),
                new QueryWrapper<SalaryPayEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public PageUtils queryPageByTime(Map<String, Object> params, Wrapper<SalaryPayEntity> queryWrapper) {
        IPage<SalaryPayEntity> page = this.page(
                new Query<SalaryPayEntity>().getPage(params),
                queryWrapper
        );

        return new PageUtils(page);
    }

}
